﻿using System;
using System.Collections.Generic;
using System.Text;
using Autofac;
using Gmmy.RepositoryExtension;
using Surging.Core.ServiceHosting.Internal;

namespace Infrastructure.Repository.DataContext
{
    public static class RepositoryHostBuilder
    {
        public static void DataBaseFactoryHostBuilder(this ContainerBuilder builder)
        {
            builder.RegisterGeneric(typeof(DataBaseFactory<>)).AsImplementedInterfaces()
                .Named("DataBaseFactory", typeof(IDataBaseFactory<>)).InstancePerLifetimeScope();
        }
    }
}
